package mywebapps.jsf;

import java.util.List;

import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;

import mywebapps.dao.ArtProductDao;
import mywebapps.model.ArtProduct;

@Named("viewArtProductsBean")
@RequestScoped
public class ViewArtProductsAction {
	@Inject private ArtProductDao artProductDao;
    private List<ArtProduct> artProducts;

    @PostConstruct
    public void init() {
    	artProducts = artProductDao.getAllArtProducts();
    }
    
    public void setArtProductDao(ArtProductDao artProductDao) {
    	this.artProductDao = artProductDao;
    }
    
	public List<ArtProduct> getArtProducts() {
		return artProducts;
	}
    
    
}
